define(["jquery","text!modules/shopCar/shopCar.html","modules/footer/footer","css!modules/shopCar/shopCar.css"],function($,html,footer){
	function render(){
		$("body").empty();
		footer.render();
		$("body").append(html);	
		//页脚
	for(var i=0;i<5;i++){
	$(".footer .top").eq(i).css("backgroundImage","url(img/footer"+i+".png)");
		}	
		$(".footer .top").eq(3).css("backgroundImage","url(img/f"+3+".png)");
	//添加购物车
	if(localStorage.getItem("commodity")){
		var homeData=JSON.parse(localStorage.getItem("commodity"));
		for(var i=0;i<homeData.length;i++){
			if(homeData[i].code>0){
				var li=$("<li/>");
				var select=$("<div class="+"shopCar_select"+">&#xe608;</div>");
				var img=$("<div class="+"shopCar_liImg"+"></div>").css("backgroundImage","url("+homeData[i].img+")");
				var div=$("<div class="+"shopCar_particular"+"><p class="+"shopCar_product-name"+">"+homeData[i].name+"</p><p class="+"price"+">"+"￥"+homeData[i].price+"</p></div><div class="+"shopCar_btn"+"><span class='add Gbth'></span><span class="+"shopCar_Number"+">"+homeData[i].code+"</span><span class='subtract Gbth'></span></div>");
				li.append(select).append(img).append(div).appendTo($(".shopCar_commodity"));
			}
		}		
	}




	}
	return{
		render:render
	}
})